console.log(__dirname);
console.log(__filename);
console.log(process.env.PATH);
console.log(process.pid);
console.log(process.argv);
const myURL=new URL("/foo","https://example.com");
myURL.searchParams.append("key","value");
console.log(myURL.href);
let params=new URLSearchParams(myURL.searchParams);
params.append("key1","value1");
params.append("key2","李四");
console.log(params);
myURL.search=params;
console.log(myURL.href);
const buf=Buffer.from("r中国","utf-8");
const strBase64=buf.toString("base64");
console.log(strBase64);
console.log(Buffer.from(strBase64,"base64").toString("utf-8"));
let timer =setInterval(()=>{
    console.log(`${new Date().toLocaleString()}`);
},1000);
process.on("SIGINT",()=>{
    console.log("系统退出...");
    clearInterval(timer);
})
//process.exit(0)



